<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>计算属性-响应式依赖</title>
  <script src="vue.js"></script>
</head>
<body>
   <script>
      let square = {length:2};

      let vm = new Vue({
         data: square,
         computed: {
            area(){
               return this.length * this.length;
            }
         }
      })
      console.log(vm.area);  
      vm.length = 3
      console.log(vm.area);  
   </script>
</body>
</html>
